﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true" CodeFile="Aseguradoras.aspx.cs" Inherits="Aseguradoras" %>

<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <dx:ASPxGridView ID="ASPxGridViewTipoVehiculo" runat="server" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSourceTipoVehiculo" 
        KeyFieldName="ACD_ID" Theme="PlasticBlue" Width="80%">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0">
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
                <DeleteButton Visible="True">
                </DeleteButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="ACD_ID" ReadOnly="True" VisibleIndex="1" 
                Caption="ID">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="ACD_NOMBRE" VisibleIndex="2" 
                Caption="NOMBRE">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="NIT" FieldName="ACD_NIT" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="DIRECCION" FieldName="ACD_DIRECCION" 
                VisibleIndex="4">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="TELEFONO" FieldName="ACD_TELEFONO" 
                VisibleIndex="5">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="ZON_ID" Visible="False" VisibleIndex="6">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior ConfirmDelete="True" />
        <Settings ShowFilterRow="True" ShowGroupPanel="True" />
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSourceTipoVehiculo" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MCSIGConnectionString %>" 
        DeleteCommand="DELETE FROM [AUT_ASEGURADORAS] WHERE [ACD_ID] = @ACD_ID" 
        InsertCommand="INSERT INTO [AUT_ASEGURADORAS] ([ACD_NOMBRE], [ACD_NIT], [ACD_DIRECCION], [ACD_TELEFONO], [ZON_ID]) VALUES (@ACD_NOMBRE, @ACD_NIT, @ACD_DIRECCION, @ACD_TELEFONO, @ZON_ID)" 
        SelectCommand="SELECT * FROM [AUT_ASEGURADORAS]" 
        
        UpdateCommand="UPDATE [AUT_ASEGURADORAS] SET [ACD_NOMBRE] = @ACD_NOMBRE, [ACD_NIT] = @ACD_NIT, [ACD_DIRECCION] = @ACD_DIRECCION, [ACD_TELEFONO] = @ACD_TELEFONO, [ZON_ID] = @ZON_ID WHERE [ACD_ID] = @ACD_ID">
        <DeleteParameters>
            <asp:Parameter Name="ACD_ID" Type="Decimal" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ACD_NOMBRE" Type="String" />
            <asp:Parameter Name="ACD_NIT" Type="String" />
            <asp:Parameter Name="ACD_DIRECCION" Type="String" />
            <asp:Parameter Name="ACD_TELEFONO" Type="String" />
            <asp:Parameter Name="ZON_ID" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="ACD_NOMBRE" Type="String" />
            <asp:Parameter Name="ACD_NIT" Type="String" />
            <asp:Parameter Name="ACD_DIRECCION" Type="String" />
            <asp:Parameter Name="ACD_TELEFONO" Type="String" />
            <asp:Parameter Name="ZON_ID" Type="String" />
            <asp:Parameter Name="ACD_ID" Type="Decimal" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>

